package com.common;

import com.aliyuncs.exceptions.ClientException;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static util.SmsDemo.sendSms;

/**
 * Created by Arat.Wu on 2017/12/15.
 */
@RestController
@RequestMapping("/sendMessagecontroller")
public class SendMessageController {
    @RequestMapping(value = "/sendMessage")
    public void sendMessage(String mobile) throws ClientException {
        System.out.println(mobile);
        sendSms(mobile);
        System.out.println("end");
    }
}
